package com.code.zjm.demo.adapt;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ZJM on 2017/3/3.
 */

public class BaseAdapterDemo extends AppCompatActivity {
    private ListView lvBase;
    private List<CustomListCellData> cellData = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_base);
        lvBase = (ListView) findViewById(R.id.lvBase);

        cellData.add(new CustomListCellData("Lin", 23, "man", R.drawable.timg));
        cellData.add(new CustomListCellData("Mary", 23, "woman", R.drawable.timg_right));
        lvBase.setAdapter(new CustomBaseAdapter(BaseAdapterDemo.this, cellData));

    }

}
